package com.eric.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * @author Eric
 * @date 2021.7.6
 */
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan(value = "com.eric.product.dao")
public class ProductApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(ProductApplication.class, args);
        ConfigurableEnvironment environment = context.getEnvironment();
        String type = environment.getProperty("spring.datasource.type");
        String name = environment.getProperty("spring.datasource.name");
        System.err.println("type:" + type + ",name:" + name);
    }

}
